package com.ruoyi.huanghefd.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

/**
 * 作业安全风险控制卡
 * @TableName attachsheet_os
 */
@TableName(value ="attachsheet_os")
@Data
public class AttachsheetOs implements Serializable {
    /**
     * ID
     */
    private String asId;

    /**
     * 工作票编号
     */
    private String asCode;

    /**
     * 工作票类型，见码值
     */
    private String asType;

    /**
     * 工作票状态；-2作废，-1-暂存，0-正在执行票，1-已执行票，2-工作终结票，3-典型票，4-终止票,5-押票箱
     */
    private Integer asState;

    /**
     * 工作负责人ID
     */
    private String asPrincipalid;

    /**
     * 工作负责人
     */
    private String asPrincipal;

    /**
     * 工作内容
     */
    private String content;

    /**
     * 作业类别，A1-安装，B1-调试,C1-检查,D1-维护,E1-检修,F1-试验,G1-清扫,A2-动火作业，B2-高处作业,C2-起重作业,D2-临时用电,E2-水冲洗,F2-化学清洗,G2-射线探伤,A3-有限空间，B3-土方开挖,C3-基坑支护,D3-脚手架搭拆;A4-其他内容
     */
    private String workType;

    /**
     * 作业类别，A4-其他内容
     */
    private String workTypeOthers;

    /**
     * 作业风险,A-高处坠落,B-物体打击,C-火灾/爆炸,D-灼烫,E-坍塌,F-起重伤害,G-机械伤害,H-中毒/室息,I-触电,J-淹溺,K-车辆伤害,L-设备损坏,M-其他
     */
    private String workSafety;

    /**
     * 作业风险，M-其他
     */
    private String workSafetyOthers;

    /**
     * 工作负责人签名
     */
    private String principalSign;

    /**
     * 工作班成员签名
     */
    private String memberSign;

    /**
     * 签名时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date signDate;

    /**
     * 到岗成员签名和时间
     */
    private String arriveSign;

    /**
     * 备注
     */
    private String remark;

    /**
     * 明细表 过程风险预控
     */
    private List<AttachsheetOs1> os1;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        AttachsheetOs other = (AttachsheetOs) that;
        return (this.getAsId() == null ? other.getAsId() == null : this.getAsId().equals(other.getAsId()))
            && (this.getAsCode() == null ? other.getAsCode() == null : this.getAsCode().equals(other.getAsCode()))
            && (this.getAsType() == null ? other.getAsType() == null : this.getAsType().equals(other.getAsType()))
            && (this.getAsState() == null ? other.getAsState() == null : this.getAsState().equals(other.getAsState()))
            && (this.getAsPrincipalid() == null ? other.getAsPrincipalid() == null : this.getAsPrincipalid().equals(other.getAsPrincipalid()))
            && (this.getAsPrincipal() == null ? other.getAsPrincipal() == null : this.getAsPrincipal().equals(other.getAsPrincipal()))
            && (this.getContent() == null ? other.getContent() == null : this.getContent().equals(other.getContent()))
            && (this.getWorkType() == null ? other.getWorkType() == null : this.getWorkType().equals(other.getWorkType()))
            && (this.getWorkTypeOthers() == null ? other.getWorkTypeOthers() == null : this.getWorkTypeOthers().equals(other.getWorkTypeOthers()))
            && (this.getWorkSafety() == null ? other.getWorkSafety() == null : this.getWorkSafety().equals(other.getWorkSafety()))
            && (this.getWorkSafetyOthers() == null ? other.getWorkSafetyOthers() == null : this.getWorkSafetyOthers().equals(other.getWorkSafetyOthers()))
            && (this.getPrincipalSign() == null ? other.getPrincipalSign() == null : this.getPrincipalSign().equals(other.getPrincipalSign()))
            && (this.getMemberSign() == null ? other.getMemberSign() == null : this.getMemberSign().equals(other.getMemberSign()))
            && (this.getSignDate() == null ? other.getSignDate() == null : this.getSignDate().equals(other.getSignDate()))
            && (this.getArriveSign() == null ? other.getArriveSign() == null : this.getArriveSign().equals(other.getArriveSign()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getAsId() == null) ? 0 : getAsId().hashCode());
        result = prime * result + ((getAsCode() == null) ? 0 : getAsCode().hashCode());
        result = prime * result + ((getAsType() == null) ? 0 : getAsType().hashCode());
        result = prime * result + ((getAsState() == null) ? 0 : getAsState().hashCode());
        result = prime * result + ((getAsPrincipalid() == null) ? 0 : getAsPrincipalid().hashCode());
        result = prime * result + ((getAsPrincipal() == null) ? 0 : getAsPrincipal().hashCode());
        result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode());
        result = prime * result + ((getWorkType() == null) ? 0 : getWorkType().hashCode());
        result = prime * result + ((getWorkTypeOthers() == null) ? 0 : getWorkTypeOthers().hashCode());
        result = prime * result + ((getWorkSafety() == null) ? 0 : getWorkSafety().hashCode());
        result = prime * result + ((getWorkSafetyOthers() == null) ? 0 : getWorkSafetyOthers().hashCode());
        result = prime * result + ((getPrincipalSign() == null) ? 0 : getPrincipalSign().hashCode());
        result = prime * result + ((getMemberSign() == null) ? 0 : getMemberSign().hashCode());
        result = prime * result + ((getSignDate() == null) ? 0 : getSignDate().hashCode());
        result = prime * result + ((getArriveSign() == null) ? 0 : getArriveSign().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", asId=").append(asId);
        sb.append(", asCode=").append(asCode);
        sb.append(", asType=").append(asType);
        sb.append(", asState=").append(asState);
        sb.append(", asPrincipalid=").append(asPrincipalid);
        sb.append(", asPrincipal=").append(asPrincipal);
        sb.append(", content=").append(content);
        sb.append(", workType=").append(workType);
        sb.append(", workTypeOthers=").append(workTypeOthers);
        sb.append(", workSafety=").append(workSafety);
        sb.append(", workSafetyOthers=").append(workSafetyOthers);
        sb.append(", principalSign=").append(principalSign);
        sb.append(", memberSign=").append(memberSign);
        sb.append(", signDate=").append(signDate);
        sb.append(", arriveSign=").append(arriveSign);
        sb.append(", remark=").append(remark);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}